/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.verolux.soft.debaraz.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author ut1e8p
 */
@Entity
@Table(name = "first_bean")
public class FirstBean {

    @Id
    @Column(name = "first_bean_pk")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(name = "family_name")
    private String familyName;

    @Column(name = "first_name")
    private String firstName;

    @Column(name = "birthday")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date birthday;

    /**
     *
     */
    public FirstBean() {
    }

    /**
     *
     * @param familyName
     * @param firstName
     * @param birthday
     */
    public FirstBean(String familyName, String firstName, Date birthday) {
        this.familyName = familyName;
        this.firstName = firstName;
        this.birthday = birthday;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getFamilyName() {
        return familyName;
    }

    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    

    @Override
    public String toString(){
        StringBuilder b = new StringBuilder();
        b.append("[\n");
        b.append("FamilyName:").append(familyName).append("\n");
        b.append("FirstName:").append(firstName).append("\n");
        b.append("Birthday:").append(birthday).append("\n");
        b.append("]\n");
        return b.toString();
    }
}
